<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>

    <title>学校名称</title>
    <link rel="stylesheet" href="../css/base.css"/>
    <link rel="stylesheet" href="../css/topic.css"/>
    <link rel="stylesheet" href="../css/sweetalert2.css"/>
    <style>
        html{
            height: 100%;
            width: 100%;
            background-color: #eee;
        }
        header{
            background-color: #fff;
        }
        header  i{
            height: 0.6rem;
            left: 3%;
            top: 48%;
        }
        header h3{
            color:#333;
            line-height: 1.3rem;
        }
        .done_school{
            background: none;
            color:#333;
            width: 0.8rem;
            padding-top: 0.1rem;
            font-size: 0.3rem;
            display: inline-block;
        }
        .content{
            padding-top:1.5rem;
        }
        .content input{
            display: block;
            height:1rem;
            width: 100%;
            line-height: 1rem;
            font-size:0.3rem;
            text-indent: 2em;
        }
        /*改变placeholder的字体颜色*/
        :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
            color: #666666; opacity:1;
        }

        ::-moz-placeholder { /* Mozilla Firefox 19+ */
            color: #666666;opacity:1;
        }

        input:-ms-input-placeholder{
            color: #666666;opacity:1;
        }

        input::-webkit-input-placeholder{
            color: #666666;opacity:1;
        }
    </style>
</head>
<body>
<div class="layer">
    <header class="clearfix">
        <i onclick="back()" ></i>
        <h3>设置您的昵称</h3>
        <em  class="done_school">完成</em>
    </header>
    <div class="content">
        <input type="text" placeholder=" 请输入您的昵称" class="name"/>
    </div>
</div>
</body>
<script src="../js/x_rem.js"></script>
<script src="../js/jquery.js"></script>
<script src="../js/sweetalert2.js"></script>
<script>
    $(function(){
        function back(){
            history.go(-1);
        }
        $(".done_school").click(function(){
            var nick_name= $(".name").val();
            //console.log(content);
            //content.JSON.stringify(content);
            if(nick_name!==""){
                window.localStorage.setItem("nick_name",JSON.stringify(nick_name));
                back();
            }else{
                sweetAlert(
                        '哎呦……',
                        '请您设置一个昵称！',
                        'error'
                )
            }
            //传给后台 然后后台在返回给我，我渲染到更外一个页面
        })
    })

</script>
</html>